﻿@inherits CmsWebViewPage

<div id="contactUsForm">
	@{
		using (var cmtFrm = CarrotCakeHtml.BeginContactForm(new AjaxOptions { UpdateTargetId = "contactUsForm" })) {
			var cmt = cmtFrm.GetModelHelper("_contactus");
			if (!cmt.ViewData.Model.IsSaved) {
				@cmt.ValidationSummary(true, "", new { @class = "text-danger" })

				<div class="row 50%">
					<div class="6u 12u(mobile)">
						@cmt.TextBoxFor(m => m.CommenterName, new { placeholder = "Name" })
						@cmt.ValidationMessageFor(m => m.CommenterName, "", new { @class = "text-danger" })
					</div>
					<div class="6u 12u(mobile)">
						@cmt.TextBoxFor(m => m.CommenterEmail, new { placeholder = "Email" })
						@cmt.ValidationMessageFor(m => m.CommenterEmail, "", new { @class = "text-danger" })
					</div>
				</div>
				<div class="row 50%">
					<div class="12u">
						@cmt.ValidationMessageFor(m => m.PostCommentText, "", new { @class = "text-danger" })
						@cmt.TextAreaFor(m => m.PostCommentText, new { rows = "5", cols = "50", placeholder = "Message" })
					</div>
				</div>
				<div class="row 50%">
					<div class="12u">
						<ul class="actions">
							<li><input type="submit" value="Send Message" /></li>
							<li><input type="reset" value="Clear form" /></li>
						</ul>
					</div>
				</div>
			} else {
				<p>Thank you for your comment.</p>
			}
		}
	}
</div>